<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
    ];

    /**
     * Define the application's command schedule.
     *
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
     */
    protected function schedule(Schedule $schedule)
    {
        $schedule->command('fetch:vipRate')->dailyAt('00:02')->description('vip用户留存统计');
        $schedule->command('fetch:everyday')->dailyAt('00:05')->description('登陆用户数量统计');
        $schedule->command('fetch:dataList')->dailyAt('00:15')->description('基础数据统计');
        $schedule->command('fetch:ltv')->dailyAt('00:20')->description('付费分析LTV统计');
        $schedule->command('fetch:vipRank')->dailyAt('00:25')->description('vip用户排行统计');
        $schedule->command('fetch:userRemain')->dailyAt('00:28')->description('普通留存统计');
        $schedule->command('fetch:resource')->dailyAt('0:30')->description('资源消耗数据统计');
        $schedule->command('fetch:levelRemain')->daily('0:33')->description('流失等级统计');
        $schedule->command('fetch:online')->hourly()->description('时段在线人数统计');
        $schedule->command('fetch:hourOrder')->hourly()->description('每小时充值统计');
        $schedule->command('fetch:guide')->dailyAt('00:10')->description('引导任务统计');
        $schedule->command('server:openPlan')->everyTenMinutes()->description('计划开服');
        $schedule->command('server:noticePlan')->everyMinute()->description('定时公告');
        $schedule->command('server:mailPlan')->everyTenMinutes()->description('定时邮件');
        $schedule->command('server:chatRobot')->everyThirtyMinutes()->description('定时统计聊天广告');
    }

    /**
     * Register the commands for the application.
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
